using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using IReaper.CourseData;
using IReaper.Statues;

namespace IReaper.Command
{
    class OpenOnDemandVideo:CommandBase
    {
        public override void CommandBody(object sender, params object[] paras)
        {
            //the parameter is the event id
            if (paras.Length < 1)
                return;
            string eventID = paras[0] as string;
            if (eventID == null)
                return; 
            //check if authenticated
            if (WWE.WWEManager.Authenticate())
            {
                OnDemandWork onDemand = new OnDemandWork(eventID);
                onDemand.RunWorkerAsync();
            }
        }

        public override CommandFamily Family
        {
            get { return CommandFamily.Command_OpenOnDemandViedo; }
        }
    }
}
